<div class="mt20 clearfix ng-scope ml25">
    <span class="fl lh30 f14">回款信息</span>

    <div class="fr btn-group" ng-if="contractBaseInfo.busnisseType != null || (contractBaseInfo.contract_status != 0 && contractBaseInfo.is_cancelled == 0)">
        <button href="javascript:;" class="btn"
                ui-dialog="新增回款"
                ui-dialog-data="{}"
                ui-dialog-show="receivableRefundService.onRefundEditShow(contractBaseInfo.contract_id,$dialog,$dialogScope, 1,null,contractBaseInfo)"
                ui-dialog-ok="receivableRefundService.editRefundSave($data,$dialog,$dialogScope,reloadRefund, contractBaseInfo)"
                ui-dialog-cache="false"
                ui-dialog-url="/contract/editinc/receivable-inc-edit-refund.html"
                >新增回款
        </button>
    </div>
</div>
<div id="grid" class="table-wrap mt10 ml25" style="min-height: 200px;">

    <table width="100%" class="valign-t">
        <thead>
        <tr>
            <th width="35">序号</th>
            <th width="100">实收时间</th>
            <th width="100">归档时间</th>
            <th width="100">实收编号</th>
            <th width="70">实收总额</th>
	        <th width="70" ng-if="[4,5,6,7].indexOf(contractBaseInfo.busnisseType)>=0">手续费</th>
	        <th width="70" ng-if="[4,5,6,7].indexOf(contractBaseInfo.busnisseType)>=0">费率(%)</th>
            <th width="120">收款账号</th>
            <th width="120">收款账户</th>
            <th width="100">付款客户名称</th>
            <th width="100">对应发票</th>
            <th width="60">备注</th>
            <th width="60">操作</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="record in receivableInfo.payments">
            <td height="40"><p ng-bind="$index + 1"></p></td>
            <td class="lh14">
                <p ng-bind="record.payment_date|strdate:'yyyy-MM-dd'"></p>
            </td>
            <td class="lh14">
                <p ng-bind="record.input_date|strdate:'yyyy-MM-dd'"></p>
            </td>
            <td>
                <p ng-bind="record.payment_code"></p>
            </td>
            <td ng-if="!([4,5,6,7].indexOf(contractBaseInfo.busnisseType)>=0)">
                <p ng-bind="record.payment_amount|number:2"></p>
            </td>
            <td ng-if="[4,5,6,7].indexOf(contractBaseInfo.busnisseType)>=0">
                <p ng-bind="(record.payment_amount-record.withdraw_fee)|number:2"></p>
            </td>
	        <td ng-if="[4,5,6,7].indexOf(contractBaseInfo.busnisseType)>=0">
		        <p ng-bind="record.withdraw_fee"></p>
	        </td>
	        <td ng-if="[4,5,6,7].indexOf(contractBaseInfo.busnisseType)>=0">
		        <p ng-bind="record.withdraw_fee_rate"></p>
	        </td>
            <td>
                <p ng-bind="record.receivables_account"></p>
            </td>
            <td>
                <p ng-bind="record.receivables_account_name"></p>
            </td>
            <td>
                <p ng-bind="record.payment_account_name"></p>
            </td>
            <td>
                <p ng-bind="record.billing_invoice_no" style="word-break: break-all"></p>
            </td>

            <td>
                <a ng-mouseenter="record.is_remark_show = true" ng-mouseleave="record.is_remark_show = false">查看</a>
                <div class="remark-show" ng-if="record.is_remark_show">{{record.remark}}</div>
            </td>

            <td>
                <div ng-if="contractBaseInfo.is_cancelled == 0">
                    <a type='edit' href="javascript:;"
                       ui-dialog="查看"
                       ui-dialog-data="{edit: true, paymentId: record.payment_id}"
                       ui-dialog-show="receivableRefundService.onRefundEditShow(contractBaseInfo.contract_id,$dialog,$dialogScope, 2,null,contractBaseInfo,receivableInfo.payments)"
                       ui-dialog-cache="false"
                       ui-dialog-url="/contract/editinc/receivable-inc-edit-refund.html"
                       ng-style="{display: 'inline-block'}"
                       ng-if="false"
                            >查看
                    </a>
                    <a href="javascript:;"
                       ui-dialog="编辑"
                       ui-dialog-data="{edit: true, paymentId: record.payment_id}"
                       ui-dialog-show="receivableRefundService.onRefundEditShow(contractBaseInfo.contract_id, $dialog, $dialogScope, 2, record, contractBaseInfo)"
                       ui-dialog-ok="receivableRefundService.editRefundSave($data, $dialog, $dialogScope, reloadRefund, contractBaseInfo)"
                       ui-dialog-url="/contract/editinc/receivable-inc-edit-refund.html"
                       ui-dialog-cache="false">编辑</a>
                    <a href="javascript:void(0)" class="clearfix" ng-style="{display: 'inline-block'}"
                       title="删除回款"
                       ng-click="receivableRefundService.deleteRefund(record,reloadRefund)">删除</a>
                </div>

            </td>
        </tr>
        </tbody>
    </table>
    <div class="no-data" ng-if="refunds.length == 0" style="height:180px"><span>暂无数据</span></div>

</div>
